Home
last modified time | relevance | path

Searched hist:dcce162559ee1ce5f64992c4c65197f9270e3d4f (Results 1 – 2 of 2) sorted by path

/linux/drivers/i2c/busses/
H A Di2c-virtio.cdiff dcce162559ee1ce5f64992c4c65197f9270e3d4f Thu Oct 21 11:47:49 CEST 2021 Viresh Kumar <viresh.kumar@linaro.org> i2c: virtio: Add support for zero-length requests

The virtio specification received a new mandatory feature
(VIRTIO_I2C_F_ZERO_LENGTH_REQUEST) for zero length requests. Fail if the
feature isn't offered by the device.

For each read-request, set the VIRTIO_I2C_FLAGS_M_RD flag, as required
by the VIRTIO_I2C_F_ZERO_LENGTH_REQUEST feature.

This allows us to support zero length requests, like SMBUS Quick, where
the buffer need not be sent anymore.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/7c58868cd26d2fc4bd82d0d8b0dfb55636380110.1634808714.git.viresh.kumar@linaro.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jie Deng <jie.deng@intel.com> # once the spec is merged
/linux/include/uapi/linux/
H A Dvirtio_i2c.hdiff dcce162559ee1ce5f64992c4c65197f9270e3d4f Thu Oct 21 11:47:49 CEST 2021 Viresh Kumar <viresh.kumar@linaro.org> i2c: virtio: Add support for zero-length requests

The virtio specification received a new mandatory feature
(VIRTIO_I2C_F_ZERO_LENGTH_REQUEST) for zero length requests. Fail if the
feature isn't offered by the device.

For each read-request, set the VIRTIO_I2C_FLAGS_M_RD flag, as required
by the VIRTIO_I2C_F_ZERO_LENGTH_REQUEST feature.

This allows us to support zero length requests, like SMBUS Quick, where
the buffer need not be sent anymore.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/7c58868cd26d2fc4bd82d0d8b0dfb55636380110.1634808714.git.viresh.kumar@linaro.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jie Deng <jie.deng@intel.com> # once the spec is merged